package com.bpc.cs.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author   phan_tp
 * @datetime Dec 18, 2012 : 4:07:38 PM
 */
public class LoggerUtils extends SecurityManager {

	/**
	 * Get logger to execute log action
	 * @return Logger
	 */
	public static Logger getLogger() {
    	String className = new LoggerUtils().getClassName();
    	Logger logger = LoggerFactory.getLogger(className);
    	return logger;
    }

	/**
	 * Get current class which execute log action
	 * @return String class name
	 */
    private String getClassName() {
    	return getClassContext()[2].getName();
    }
}
